using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
namespace SRW.SetInfo
{
   class SetWtnews
   {
      public static SqlCommand Set_Wtnews_Data(SqlCommand cmd, Wtnews mWtnews,bool CheckPk)
      {
         
         if (!(string.IsNullOrEmpty(mWtnews.pkID.ToString())))
         {
            if (CheckPk)
               cmd.Parameters.AddWithValue("@pkID", mWtnews.pkID);
         }
         if (!(string.IsNullOrEmpty(mWtnews.wtnewsName.ToString())))
         {
         cmd.Parameters.AddWithValue("@wtnewsName", mWtnews.wtnewsName);
         }
         if (!(string.IsNullOrEmpty(mWtnews.wtnewsContent.ToString())))
         {
         cmd.Parameters.AddWithValue("@wtnewsContent", mWtnews.wtnewsContent);
         }
         if (!(string.IsNullOrEmpty(mWtnews.wtnewsDate.ToString())))
         {
         cmd.Parameters.AddWithValue("@wtnewsDate", mWtnews.wtnewsDate);
         }
         if (!(string.IsNullOrEmpty(mWtnews.wtnewsMan.ToString())))
         {
         cmd.Parameters.AddWithValue("@wtnewsMan", mWtnews.wtnewsMan);
         }
         if (!(string.IsNullOrEmpty(mWtnews.wtnewsType.ToString())))
         {
         cmd.Parameters.AddWithValue("@wtnewsType", mWtnews.wtnewsType);
         }
         return cmd;
      }
   }
}
